home *** CD-ROM | disk | FTP | other *** search
- Path: news.uni-jena.de!news
- From: mkt@isun04.inf.uni-jena.de (Tilo Koerbs)
- Newsgroups: comp.lang.c++
- Subject: Re: About inline function
- Date: 2 Feb 1996 11:18:06 GMT
- Organization: Lehrstuhl fuer Rechnerarchitektur- und kommunikation, FSU Jena
- Message-ID: <4esrte$80l@fsuj01.rz.uni-jena.de>
- References: <4dnvnl$o0s@mis.cpc.ku.ac.th>
- Reply-To: mkt@isun04.inf.uni-jena.de
- NNTP-Posting-Host: isun07.inf.uni-jena.de
-
- Borland C++ will only expand functions inline if it is worth doing it.
- Since 'larger' inline fuctions can pump up code size dramatically,
- it is not usefull do expand it inline. And since a function call overhead
- on i80x86 is not a very big thing, the compiler restricts inlining.
-
- The problem is: What is the right restriction criteria?
- Borland didn't used a good one.
- In practice, neither the user nor the compiler are able to find out
- exactly which functions to expand inline.
- The user: - don't know the costs of function calls
- - don't know the run time of the code
- - don't know the additional optimizations taken by
- the compiler when inlining a function
- The compiler: - don't know how often the function is called
- - don't know how much 'space for time' the user wants to give
-
- Bye.
- Tilo Koerbs
-
-
-
-